package cn.me.alphamq.broker.core.consumequeue;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * ConsumeQueue 的 MMap 文件的模型的管理者
 *
 * @author f
 */
public class ConsumeQueueMMapFileModelManager {

    /**
     * key: topic 名称，value: ConsumeQueue 文件的 MMap 对象组成的链表
     */
    private final Map<String, List<ConsumeQueueMMapFileModel>> consumeQueueMMapFileModelMap = new HashMap<>();

    public void put(String topic, List<ConsumeQueueMMapFileModel> consumeQueueMMapFileModelList) {
        consumeQueueMMapFileModelMap.put(topic, consumeQueueMMapFileModelList);
    }

    public List<ConsumeQueueMMapFileModel> get(String topic) {
        return consumeQueueMMapFileModelMap.get(topic);
    }

}
